package day1;

/**
 * @author oldliu
 * @since 1.0
 */
public class SchoolTest4 {
    //变量的遍历
    public static void main(String[] args) {
//        int i=100;
//        int j=i;
//        i=499;
//        System.out.println("j="+j);
        School s=new School();
        s.name="合肥科海学院南京分院";
        s.classRooms=12;
        s.labs=9;
        s.location="南京";
        s.show();
        School mys=s;//关键！
        System.out.println("<<<<<<<<<<<<<<<<<<<<<<<<<");
        mys.show();
        System.out.println(s);
        System.out.println(mys);
        System.out.println("增加几个教室");
        s.classRooms+=5;
        mys.labs-=1;
        s.show();
        System.out.println("==========mys=-------------");
        mys.show();

        if(mys==s){
            System.out.println("同一个对象");
        }else{
            System.out.println("不同的对象");
        }
    }
}
